"""
常量
"""


class DirectionType:
    Buy = 'buy'
    Sell = 'sell'


class AuthInfoType:
    Api = 'api'
    Oauth = 'oauth'


class ContratType:
    Option = 'option'
    Future = 'future'
    Spot = 'spot'


class PositionSide:
    Both = 'both'
    Long = 'long'
    Short = 'short'


class OrderType:
    Limit = 'limit'
    Market = 'market'
    Unknown = 'unknown'


class PriceType:
    Price = 'price'
    IV = 'iv'


class PositionMarginMode:
    Cross = 'cross'         # 全仓模式
    Isolated = 'isolated'   # 逐仓模式


class OrderState:
    Open = 'open'
    Filled = 'filled'
    Cancelled = 'cancelled'     # 主动撤销
    Closed = 'closed'           # 被动撤销
    Unknown = 'unknown'


class FutureType:
    Delivery = 'delivery'
    Perpetual = 'perpetual'


class OptionType:
    Call = 'call'
    Put = 'put'


class Exchange:

    DERIBIT = 'deribit'
    BINANCE = 'binance'
    OKX = 'okx'
    bybit = 'Bybit'


class TimeInForce:
    GTC = 'gtc'


# 稳定币列表
STABLE_COINS = {
    'USDC', 'USDT', 'BUSD', 'USD'
}
